package com.coco.bargain.controller;

import com.coco.bargain.service.BargainService;
import com.coco.common.annotation.IngoreResponseAdvice;
import com.coco.common.result.CommonResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * @Author: guofeng
 * @Date: 2021/07/20/15:29
 * @Description:
 */
@RestController
@RequestMapping("/bargain/bargain")
@IngoreResponseAdvice
public class BargainController {

    @Autowired
    private BargainService bargainService;

    @RequestMapping("/bargain")
    public String bargainAdd(@RequestParam("gid") Long gid){
        return bargainService.bargainAdd(gid);
    }

    @RequestMapping("/first")
    public String first(@RequestParam("card") String card){
        return bargainService.firstBargain(card);
    }

    @RequestMapping("/helpMe")
    public  String helpMe(@RequestParam("helpUid") Integer helpUid, @RequestParam("card")String card){
        return bargainService.helpMe(helpUid,card);
    }


}
